package com.forezp.thinking.chapter18;

import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.IOException;

/**
 * Created by forezp on 2017/12/8.
 */
public class FormatMemoryInput {

    public static void main(String[] args) throws IOException {
        DataInputStream dataInputStream = new DataInputStream(
                new ByteArrayInputStream(
                        BufferedInputFile.readFile(BufferedInputFile.FILE_NAME).getBytes()));

        while (true) {
            System.out.print((char) dataInputStream.readByte());
        }

    }
}
